Conversation
|
Hi, Can you make it so that the config file can be specified on the command line, and one doesn't have to change the script to use (or not use) a config file? The easiest solution (albeit a bit ugly) would probably be to check the first character of the first argument, and if it's a '/', treat it as a file. Or do it like cURL, and treat names that start with a character like '@' as a file (stripping the @, of course). Both solutions would be acceptable to me. Thanks for contributing, I appreciate it! Best regards, |
|
Or.... Add a note about the config file in the 'Configuration' section of the README. But as it currently is, it uses a config file by default, and throws an exception if the file doesn't exist. Maybe change the default to None? Best regards, |
|
Hmm I can check if the argument is a file/path or a host/hosts list. |
For adding hosts without restarting the script.
It reads a list of hosts from a file in every execution so you can have the daemon running all the time and just add or remove new hosts.